export const number = {
    money(val, decimal = 2) {
        const [sum, dot] = Number(val).toFixed(decimal).split('.');
        return Number(sum.replace(/\B(?=(?:\d{3})+$)/g, ',') + dot);
    },
    fixed(val, decimal = 2) {
        return Number(Number(val).toFixed(decimal));
    },
};
